<template>
    <div class="pay-footer">
        <div class="body row">
            <div class="text">合计</div>
            <div class="order-price row">
                <span>￥</span>
                <span class="num">{{ pricePay }}</span>
            </div>
            <div class="btn row" @click="createOrder">
                <div>去支付</div>
                <div class="icon">
                    <img :src="require('@/assets/icon/right.png')" />
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    props: {
        pricePay: Number
    },
    data() {
        return {};
    },
    computed: {},

    methods: {
        createOrder() {
            this.$emit("create-order");
        }
    }
};
</script>


<style lang="less" scoped>
.pay-footer {
    position: fixed;
    bottom: 0;
    box-sizing: border-box;
    border-top: 1px solid #ddd;
    padding: 0 30px;
    width: 100%;
    background: #fff;

    .body {
        height: 100px;
        justify-content: space-between;
        align-items: center;

        .text {
            margin-right: 15px;
        }
        .order-price {
            flex: 1 1 auto;
            align-items: center;
            color: #fb4e44;
            font-size: 36px;
            .num {
                font-size: 50px;
                font-weight: 700;
            }
        }
        .btn {
            padding: 20px 30px 20px 50px;
            background: #ffc031;
            border-radius: 40px;
            align-items: center;

            .icon {
                width: 25px;
                height: 25px;
                margin-left: 10px;
            }
        }
    }
}
</style>